from elasticsearch import Elasticsearch

es=Elasticsearch('144.34.200.236:9200')


masp={
  "mappings": {
    "dht_type": {
      "properties": {
        "name": {
          "type": "text",
          "analyzer": "ik_max_word",
          "search_analyzer": "ik_max_word"
        },
        "data": {
          "properties": {
            "times":  { "type": "date" },
            "length": {"type": "integer"},
            "path": {"type": "text"},

          }
        }
      }
    }
  }
}
if __name__=="__main__":
    if es.indices.exists("dht") is not True:
        print(111)
        es.indices.create(index="dht",body=masp)
        print(222)